[PATCH v2] tunables: Terminate immediately if end of input is reached
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 11 Sep 2023 22:53:15 +0000 (18:53 -0400)
committerArnaud Rebillout <arnaudr@debian.org>
Wed, 27 May 2026 04:49:44 +0000 (11:49 +0700)
commit23dd5c522a64b0de578b4dd12b1e1e18ccce4aa2
tree6b866b144b14fb21df21bfdcad2988aa67d6bbb0
parent6d6ca56d4f296f32c815d03cfcd900ee90ed4c2b
[PATCH v2] tunables: Terminate immediately if end of input is reached

The string parsing routine may end up writing beyond bounds of tunestr
if the input tunable string is malformed, of the form name=name=val.
This gets processed twice, first as name=name=val and next as name=val,
resulting in tunestr being name=name=val:name=val, thus overflowing
tunestr.

Terminate the parsing loop at the first instance itself so that tunestr
does not overflow.

Gbp-Pq: Topic any
Gbp-Pq: Name local-CVE-2023-4911.patch
elf/dl-tunables.c